Change Mini-OS so that it uses stddef.h to define size_t and
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 4 May 2006 10:24:19 +0000 (11:24 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 4 May 2006 10:24:19 +0000 (11:24 +0100)
NULL. This problem fixes errors that occur when linking Mini-OS with
ANSI standard code that uses stddef.h.
Signed-off-by: Keir Fraser <keir@xensource.com>
extras/mini-os/include/lib.h
extras/mini-os/include/os.h
extras/mini-os/include/types.h

index 7631349faf369a329855cee654b83c417736aec1..473a05970592bd0db14a39799fcd41cdb7f63480 100644 (file)
@@ -56,6 +56,7 @@
 #define _LIB_H_
 
 #include <stdarg.h>
+#include <stddef.h>
 #include <console.h>
 
 /* printing */
index 8758c5dd2371bab6a90c65b70eace05e612fe3d6..883d5f6b1d6177acbd493d0acc5b8c5d106be5aa 100644 (file)
@@ -7,9 +7,6 @@
 #ifndef _OS_H_
 #define _OS_H_
 
-#define NULL 0
-
-
 #if __GNUC__ == 2 && __GNUC_MINOR__ < 96
 #define __builtin_expect(x, expected_value) (x)
 #endif
index 8c3a6b385ed306657a8fb12bba593566843b19e0..8194fba3c0bd09f85e59a02068b16340fb43d72a 100644 (file)
@@ -34,8 +34,6 @@ typedef signed long         s64;
 typedef unsigned long       u64;
 #endif
 
-typedef unsigned int        size_t;
-
 /* FreeBSD compat types */
 typedef unsigned char       u_char;
 typedef unsigned int        u_int;